<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>提交漏洞 | <?php echo ($site_name_cn); ?>安全应急响应中心</title>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
        <meta name="description" content="<?php echo ($site_name_cn); ?>安全应急响应中心,<?php echo ($site_name_en); ?> Security Response Center">
        <meta name="keywords" content="<?php echo ($site_name_cn); ?>,<?php echo ($site_name_en); ?>,安全团队,应急响应,<?php echo ($site_name_cn); ?>安全应急响应中心,<?php echo ($site_name_en); ?> Security Response Center">
        <meta name="renderer" content="webkit">
        <meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no">
        <link rel="icon" href="/Public/Index/images/logo.ico">
        <link rel="stylesheet" href="/Public/Index/css/main.css">
        <!--[if (gte IE 6)&(lte IE 8)]>
        兼容 CSS3 选择器
        <script type="text/javascript" src="/Public/Index/js/selectivizr.min.js"></script>
        兼容 media query
        <script type="text/javascript" src="/Public/Index/js/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="header">
            <div>
                <div class="logo">
                    <a href="">
                        <div class="logo_pic">
                        </div>
                        <div class="logo_name">
							<p><?php echo ($site_name_cn); ?>安全应急响应中心</p>
                            <p><?php echo ($site_name_en); ?> Security Response Center</p>
                        </div>
                    </a>
                </div>

                <div class="userpanel">
                    <div class="userpanel_line">
                        <div></div>
                    </div>
                    <div class="userpanel_user">
                        <img class="user_avatar mod-avatar-30" src="/Public/Uploads/<?php echo session('avatar');?>" alt="">
                        <span class="user_username"><?php echo session('username'); if(session('mnum') == 0): else: ?><i class="i-header-message"><?php echo session('mnum');?></i><?php endif; ?></span>
                        <i class="user_arrow"></i>
                        <div class="user_menu">
                            <ul class="menu_list">
                                <li class="list_item list_item-user">
                                    <a href="<?php echo U('index/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">个人主页</span>
                                    </a>
                                </li>
                                <li class="list_item list_item-message">
                                    <a href="<?php echo U('message/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">消息中心</span>
                                        <i class="item_icon-message"><?php echo session('mnum');?></i>
                                    </a>
                                </li>
                                <li class="list_item list_item-account">
                                    <a href="<?php echo U('info/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">账户设置</span>
                                    </a>
                                </li>
                                <li class="list_item list_item-logout">
                                    <a href="<?php echo U('login/logout');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">注销</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="nav">
                    <ul>
                        <li class="[index_banner]"><a href="/index.php">首页</a></li>
                        <li class="nav_item-active"><a href="<?php echo U('post/add');?>">提交漏洞</a></li>
                        <li class="[annoucment_banner]"><a href="/index.php?m=&c=page&a=index">公告</a></li>
						<li class="[blog_banner]"><a href="/index.php?m=&c=blog&a=index">博客</a></li>
						<li class="[hall_banner]"><a href="/index.php?m=&c=hall&a=index">贡献榜</a></li>
                        <li class="[gift_banner]"><a href="<?php echo U('gift/index');?>">礼品兑换</a></li>
                    </ul>
                </div>
            </div>
        </div>
<script type="text/javascript" src="/Public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/Public/ueditor/ueditor.all.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('post-content',{
        toolbars: [
            ['simpleupload','link','unlink', '|', 'selectall', 'cleardoc'],
        ],
        initialFrameHeight:500,
        zIndex:100
    });
	
	/**恢复自动保存内容
　　setTimeout(function () {
        ue.execCommand('drafts');
    }, 500);  
	**/
</script>
<div class="container container-report">
            <div>
                <!-- section-subnav 标题-->
                <div class="section section-subnav">
                    <div class="section_subnav">
                        <p class="subnav_title"><a href="#">提交漏洞</a></p>
                    </div>
                </div>
                <!-- section-report 表单 -->
                <div class="section section-report">
                    <div class="section_report">
                        <div class="report_form">
                            <form method="post" action="<?php echo U('post/add');?>">
                                <div class="mod-form-block mod-form-block-input mod-form-block-input-name">
                                    <label class="label-required" for="">漏洞名称</label>
                                    <div>
                                        <div>
                                            <input name="title" type="text" placeholder="请输入漏洞名称">
                                        </div>
                                        <span class="formtips-error">您输入的漏洞名称有误，请重新输入</span>
                                    </div>
                                </div>
                                <div class="mod-form-block mod-form-block-select mod-form-block-select-type">
                                    <label class="label-required" for="">漏洞类型</label>
                                    <div>
                                        <div>
                                            <select name="cate_id" class="type_select-2" name="" id="">
                                                <?php if(is_array($category)): foreach($category as $key=>$v): ?><option value="<?php echo ($v["id"]); ?>"><?php echo ($v["html"]); ?> <?php echo ($v["title"]); ?></option><?php endforeach; endif; ?>
                                            </select>
                                        </div>
                                        <span class="formtips-error">请您选择漏洞类型</span>
                                    </div>
                                </div>
                                <div class="mod-form-block mod-form-block-textarea mod-form-block-textarea-description">
                                    <label class="label-required" for="">漏洞描述</label>
                                    <div>
                                        <div>
                                            <script id="post-content" name="content" type="text/plain" style="width:100%"></script>
                                        </div>
                                        <span class="formtips-error">您输入的漏洞描述有误，请重新输入</span>
                                    </div>
                                </div>
                                <div class="mod-form-block mod-form-block-file">
                                    <label for="">上传附件</label>
                                    <div>
                                        <div>
                                            <a href="javascript:;" class="uploader mod-btn mod-btn-black">
                                                <input id="attachment_file" type="file" onchange="submit_attachment();"/>
												<input id="attachment_path" type="hidden" name="attachment" />
                                                选择文件
                                            </a>
                                            <span class="tips-file">格式限制：7z、zip、pdf，请上传小于8M的文件</span>
                                        </div>
										<span id="upload_success" class="formtips-success">上传成功，可继续进行提交</span>
                                        <span id="upload_fail" class="formtips-error">上传失败，请检查文件格式和大小</span>
                                    </div>
                                </div>
                                <div class="mod-form-block mod-form-block-verify">
                                    <label class="label-required" for="">验证码</label>
                                    <div>
                                        <div>
                                            <input name="verify" type="text">
                                            <img id="captcha_img" onclick="refresh_captcha();" class="verify" src="<?php echo U('login/verify');?>" alt="点击刷新"/>
                                            <a onclick="refresh_captcha();">换一张</a>
                                        </div>
                                        <span class="formtips-error">您输入的验证码有误，请重新输入</span>
                                    </div>
                                </div>
                                <div class="mod-form-block mod-form-block-submit">
                                    <div>
                                        <p class="tips-submit">在漏洞未修复之前，请不要向外界传播</p>
                                        <button class="mod-btn mod-btn-blue" type="submit">提交漏洞</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="report_remind">
                            <div>
                                <div class="remind_title">
                                    <h2>温馨提示</h2>
                                </div>
                                <div class="remind_wefocus">
                                    <h3>我们关注的内容</h3>
                                    <p>
                                        Web服务漏洞
                                    </p>
                                    <p>
                                        PC客户端软件漏洞
                                    </p>
                                    <p>
                                        手机客户端软件漏洞
                                    </p>
                                    <p>
                                        威胁情报
                                    </p>
                                </div>
                                <div class="remind_wejudge">
                                    <h3>我们的评判标准</h3>
                                    <ul>
                                        <li>
                                            <h4>1. 低等级漏洞</h4>
                                            <p>分值范围 1-2，安全币 9~18</p>
                                        </li>
                                        <li>
                                            <h4>2. 中等级漏洞</h4>
                                            <p>分值范围 3-5，安全币 45~75</p>
                                        </li>
                                        <li>
                                            <h4>3. 高等级漏洞</h4>
                                            <p>分值范围 6-8，安全币 360~480，额外现金奖励（人民币）1万~3万</p>
                                        </li>
                                        <li>
                                            <h4>4. 严重等级漏洞</h4>
                                            <p>分值范围 9-10，安全币 1080~1200，额外现金奖励（人民币）3万~10万</p>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
</div>
<script>
function submit_attachment(){
				$("#upload_fail").css("display","none");
				$("#upload_success").css("display","none");
                var formData = new FormData();
                formData.append("attachment", document.getElementById("attachment_file").files[0]);   
                $.ajax({
                    url: "/user.php?m=user&c=post&a=attachment_upload",
                    type: "POST",
                    data: formData,
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        if (data.code == "200") {
							$("#attachment_path").attr("value",data.savepath);
							$("#upload_success").css("display","block");
                        }else{
							$("#upload_fail").css("display","block");
                        }
                    },
                    error: function () {
						$("#upload_fail").css("display","block");
                    }
                });
}

function clear_draft(){
    localStorage.removeItem('ueditor_preference');
}
</script>
<script>
         function refresh_captcha(){
            var src = "<?php echo U('login/verify');?>";
            var random = Math.floor(Math.random()*(1000+1));
            $("#captcha_img").attr("src",src+"&random="+random);

        }
</script>
<!-- footer -->
        <div class="footer">
            <div>
                <div class="footer_about">
                    <p class="about_link">
                        <a href="<?php echo ($site_about); ?>" target="_blank">关于腾讯</a>
                        |
                        <a href="<?php echo ($site_career); ?>">加入我们</a>
                        |
                        <a href="/user.php?m=user&c=post&a=add">报告漏洞</a>
                    </p>
                    <p class="about_copyright">
                        <span>Copyright &copy; <?php echo date('Y'); ?> <?php echo ($site_copyright); ?>. All Rights Reserved</span>
						<span>Powered by <a href="https://security.tencent.com/index.php/xsrc">Tencent xSRC</a></span>
                    </p>
                </div>

                <div class="footer_contact">
                    <a class="contact_icon-email" href="mailto:<?php echo ($site_email); ?>"><i></i><span>专用邮箱</span>|</a>
                    <a class="contact_icon-weixin mod-qrcode" href="">
                        <i></i><span>微信公众号</span>
                        <div class="qrcode">
                            <div class="qrcode_pic">
                                <img src="<?php echo ($site_wechat); ?>" alt="">
                            </div>
                            <span class="qrcode_text">扫一扫关注公众号</span>
                        </div>
                    </a>
                </div>
            </div>
        </div>

        <script src="/Public/Index/js/jquery-1.7.2.min.js"></script>
        <script src="/Public/Index/js/test.js"></script>
		<script src="https://security.tencent.com/static/plugins/jquery.ajaxfileupload.js"></script>
    </body>
</html>